# Used for test CreateRecord function module

import CreateRecord
import time

paraTab = {"TestName":"Example1", "Input":"5", "AdditionalParameters":{"paraName":"exSub1", "failMsg":"example error"}}
paraTab2 = {"TestName":"Example2", "Input":"HTF12345678", "AdditionalParameters":{"paraName":"exSub2", "failMsg":"example error"}}
paraTab3 = {"TestName":"Example3", "Input":"FAIL", "AdditionalParameters":{"paraName":"exSub3", "failMsg":"example error"}}
paraTab4 = {"TestName":"Example4", "Input":"5", "AdditionalParameters":{"paraName":"exSub4", "failMsg":"example error"}}
paraTab5 = {"TestName":"Example5", "Input":"5", "AdditionalParameters":{"paraName":"exSub5", "failMsg":"example error"}}
paraTab6 = {"TestName":"Example6", "Input":"5", "AdditionalParameters":{"paraName":"exSub6", "failMsg":"example error"}}
limit = {"upperLimit":"10", "lowerLimit":"1", "unit":"cm"}
limitF = {"upperLimit":"4", "lowerLimit":"2", "unit":"cm"}
limitS = {"upperLimit":"HTF12345678", "lowerLimit":"", "unit":"string"}
limit2 = {"upperLimit":"10", "lowerLimit":"", "unit":""}
limit3 = {"upperLimit":"", "lowerLimit":"", "unit":""}


CreateRecord.startRecord()

# for i in range(1, 4):
# 	time.sleep(i)
# 	CreateRecord.createCSVRecord(paraTab, limit)

# for i in range(1,3):
# 	time.sleep(i)
# 	CreateRecord.createCSVRecord(paraTab, limitF)

# for i in range(1,3):
# 	time.sleep(i)
# 	CreateRecord.createCSVRecord(paraTab2, limitS)

# for i in range(1,3):
# 	time.sleep(i)
# 	CreateRecord.createCSVRecord(paraTab, limitS)

# for i in range(1,3):
# 	time.sleep(i)
# 	CreateRecord.createCSVRecord(paraTab, limit2)

# for i in range(1,3):
# 	time.sleep(i)
# 	CreateRecord.createCSVRecord(paraTab, limit2)

# CreateRecord.createCSVRecord(paraTab3, limit3)
time.sleep(1)
CreateRecord.createCSVRecord(paraTab, limit)
time.sleep(2)
CreateRecord.createCSVRecord(paraTab2, limitS)
time.sleep(3)
CreateRecord.createCSVRecord(paraTab3, limit3)
time.sleep(2)
CreateRecord.createCSVRecord(paraTab4, limit)
time.sleep(2)
CreateRecord.createCSVRecord(paraTab5, limit)
time.sleep(5)
CreateRecord.createCSVRecord(paraTab6, limit)


CreateRecord.finishRecord(paraTab2)